package com.gaofeng.day04;

public class TextGameText {
    public static void main(String[] args) {
        TextGame q1 = new TextGame("乔峰", 100,'男');
        TextGame q2 = new TextGame("鸠摩智", 100,'男');
        q1.showRoleInfo();
        q2.showRoleInfo();
        while (true){
            q1.attack(q2);
            if(q2.getBlood() == 0){
                System.out.println(q1.getName() +"KO." + q2.getName());
                break;
            }
            q2.attack(q1);
            if(q1.getBlood() == 0){
                System.out.println(q2.getName() +"KO." + q1.getName());
                break;
            }
        }
    }
}
